<div id="show">
<table>
  <tr>
    <th>Rank</th>	 
    <th>Name</th>  
	<th>Score</th> 
	<th>Push</th> 
  </tr>
  <tr>
  	<td><%= @blog.rank %></td>
	<td><%= link_to @blog.name, @blog.url %>
	<td id=<%=@blog.id%>>  <%=h @blog.click %></td>
	<td><%= link_to_remote ( image_tag("push.gif",:border => 0),
                            :update => @blog.id,
                            :url => { :action => :push,:id => @blog.id }) %>
    </td>
  </tr>
  <tr>
    <th colspan=4>Add</th>
  </tr>
  <tr>
  	<td colspan=4>
  		<%= form_remote_tag(:update => "main", :url => { :action => :tagging } ) %> 
        <%= hidden_field_tag("blog",@blog.id) %>
        <%= text_field_with_auto_complete :tag, :name, { :size => 16 }, {:tokens => ' '} %>
        <%= image_submit_tag "tag_button.gif" %> 
        <%= end_form_tag %> 
  	</td>
  </tr>
  <tr>
    <th colspan=4>Tags</th>
  </tr>
  <tr>
    <td colspan=4 id="tag">
    	<% percent = 400 %>
    	<% for blogtag in @blogtags %>
		  <div id="tag_<%=blogtag.tag.name%>" style="font-size:<%= percent %>%;margin:14px 0px 14px 0px"><%= link_to_remote ( h(blogtag.tag.name),
                               :update => 'main',
                               :url => { :action => :tag,:id => blogtag.tag.id }) %>
		  <%= link_to_remote ( image_submit_tag("plus.gif"),
                               :update => 'main',
                               :complete => "new Effect.Highlight('tag_#{blogtag.tag.name}')", 
                               :url => { :action => :plus,:blogtag => blogtag.id }) %>
	      </div>
		  <% unless percent <= 70 %>
		  <% percent-=30 %>
		  <% end %>
		<% end %>
    </td>
  </tr>
  <tr>
  	<th colspan=4>Related blogs</th>
  </tr>
  <tr>
  	<th>Rank</th>	 
    <th>Name</th>  
	<th>Score</th> 
	<th>Push</th> 
  </tr>
  <% if @related!=nil %>
  	<% for related in @related %>
	  <% if related.blog == @blog %>
	  <% next %>
	  <% else %>
	  <tr>
     <td><%= link_to_remote ( related.blog.rank,
                            :update => 'main',
                            :url => { :action => :show,:id => related.blog.id }) %>
     </td>
	  <td><%= link_to_remote ( related.blog.name,
                            :update => 'main',
                            :url => { :action => :show,:id => related.blog.id }) %>
     </td>
	  <td id=<%=related.id%>><%= related.blog.click %></td>
	  <td><%= link_to_remote ( image_tag("push.gif",:border => 0),
                            :update => related.id,
                            :url => { :action => :push,:id => related.blog.id }) %>
      </td>
	  </tr>
	  <% end %>  <!--end if -->
	<% end %> <!--end for -->
  <% end %>  <!--end if -->
  
</table>
  <div id="paginate">
    <% if @blog.rank>1 %>
    <%= link_to_remote ( image_tag("previouspage.gif", :style => "border:none"),
                         :update => 'main',
                         :url => { :action => :show,:id => Blog.find_by_rank(@blog.rank-1) }) %>
    <% end %>
    <% unless Blog.find_by_rank(@blog.rank+1)==nil %>		
    <%= link_to_remote ( image_tag("nextpage.gif", :style => "border:none"),
                         :update => 'main',
                         :url => { :action => :show,:id => Blog.find_by_rank(@blog.rank+1) }) %>
    <% end %>
  </div> <!-- /paginate-->
</div> <!-- /show-->
<div id="adsense">
	<!--adsense-->
</div>
